/*
 * Sycloud.com Inc.
 * Copyright (c) 2005-2066 All Rights Reserved.
 */
package com.insigma.business.qrcode.welfare.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.welfare.dao.CareWelfareServiceOrganizationDao;
import com.insigma.business.qrcode.welfare.entity.CareWelfareServiceOrganizationDO;
import com.insigma.business.qrcode.welfare.dto.CareWelfareServiceOrganizationBSearcher;
import com.insigma.business.qrcode.welfare.service.CareWelfareServiceOrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author juffett
 * @version $Id: CareWelfareServiceOrganizationServiceImpl.java, v 1.0.0 2021-9-9 14:45:13 juffett Exp $
 */
@Service("careWelfareServiceOrganizationService")
public class CareWelfareServiceOrganizationServiceImpl implements CareWelfareServiceOrganizationService {

    @Autowired(required = false)
    private CareWelfareServiceOrganizationDao careWelfareServiceOrganizationDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    /**
     * @see CareWelfareServiceOrganizationService#search(CareWelfareServiceOrganizationBSearcher)
     */
    @Override
    public List<CareWelfareServiceOrganizationDO> search(final CareWelfareServiceOrganizationBSearcher careWelfareServiceOrganizationBSearcher) {
        return careWelfareServiceOrganizationDao.search(careWelfareServiceOrganizationBSearcher);
    }
   /**
    * @see CareWelfareServiceOrganizationService#get(String)
    */
    @Override
    public CareWelfareServiceOrganizationDO get(final String id){
        return careWelfareServiceOrganizationDao.get(id);
    }

    /**
     * @see CareWelfareServiceOrganizationService#insert(CareWelfareServiceOrganizationDO)
     */
    @Override
    public Integer insert(final CareWelfareServiceOrganizationDO careWelfareServiceOrganizationDO){
        careWelfareServiceOrganizationDO.setId(sequenceGenerator.genKey(SequenceNameConstant.CARE_WELFARE_SERVICE_ORGANIZATION_ID));
        return careWelfareServiceOrganizationDao.insert(careWelfareServiceOrganizationDO);
    }

    /**
     * @see CareWelfareServiceOrganizationService#update(CareWelfareServiceOrganizationDO)
     */
    @Override
    public Integer update(final CareWelfareServiceOrganizationDO careWelfareServiceOrganizationDO){
        return careWelfareServiceOrganizationDao.update(careWelfareServiceOrganizationDO);
    }

    /**
     * @see CareWelfareServiceOrganizationService#delete(String, String, String)
     */
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return careWelfareServiceOrganizationDao.delete(id,modifierType,modifierId);
    }

}
